package com.cmwa.scbp.sys.permission.dataRole.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cmwa.scbp.base.annotation.MybatisDao;
import com.cmwa.scbp.sys.permission.dataRole.entity.RoleResourceVo;

/**
 * 角色立项关系DAO
 * @author ex-dingxq
 *
 */
@MybatisDao
public interface RoleResourceRelationsDao {

	/**
	 * 根据条件查询count
	 * @param marketNo
	 * @param year
	 * @return
	 */
	public int getCount(@Param("resId") String resId,@Param("roleId") String roleId);

	/**
	 * 删除角色立项关系
	 * @param roleId
	 */
	public void deleteRoleResourceRelations(@Param("roleId")String roleId, @Param("resIds")List<String> resIds,
			@Param("resType")String resType);

	/**
	 * 添加角色全部资源数据权限
	 * @param shareIds
	 */
	public void addAllResourceToRoles(@Param("roleIds")List<String> roleIds, @Param("createId")String createId,
			@Param("resType") String resType);
	
	/**
	 * 添加单个角色资源数据权限
	 */
	public void saveResourceToRoles(RoleResourceVo roleResourceVo);
}
